/*
 * @(#)InstanceResult.java Jan 18, 2012 - 11:43:36 PM
 * 
 * Copyright 2011 Cin/UFPE/iSPEED
 */
package speed2010.reformulacao.query;

import java.io.Serializable;
import java.util.List;

import speed2010.reformulacao.enums.EnrichmentType;
import speed2010.reformulacao.enums.ResultType;

/**
 * @author <a href="mailto:andreza.lba@gmail.com">Andreza Leite de Alencar</a>
 */
public class InstanceResult implements Serializable {
	private static final long serialVersionUID = 7191473269156705331L;

	private String originalQuery;
	private String instanceValue;
	private String conceptName;
	private String sourceAddress;
	private String sourceType;

	private ResultType resultType;
	private String enrichedQuery;
	private EnrichmentType enrichmentType;
	private List<String> enrichmentInfo;

	public InstanceResult(ResultType resultType, String originalQuery, String instanceValue, String conceptName,
			String sourceAddress, String sourceType) {
		this.originalQuery = originalQuery;
		this.instanceValue = instanceValue;
		this.conceptName = conceptName;
		this.sourceAddress = sourceAddress;
		this.sourceType = sourceType;
		this.resultType = resultType;
	}

	/**
	 * @return Returns the originalQuery.
	 */
	public String getOriginalQuery() {
		return originalQuery;
	}

	/**
	 * @return Returns the instanceValue.
	 */
	public String getInstanceValue() {
		return instanceValue;
	}

	/**
	 * @return Returns the conceptName.
	 */
	public String getConceptName() {
		return conceptName;
	}

	/**
	 * @return Returns the sourceAddress.
	 */
	public String getSourceAddress() {
		return sourceAddress;
	}

	/**
	 * @return Returns the sourceType.
	 */
	public String getSourceType() {
		return sourceType;
	}

	/**
	 * @return Returns the resultType.
	 */
	public ResultType getResultType() {
		return resultType;
	}

	/**
	 * @return Returns the enrichedQuery.
	 */
	public String getEnrichedQuery() {
		return enrichedQuery;
	}

	/**
	 * Changes the value of enrichedQuery as the parameter.
	 * 
	 * @param enrichedQuery
	 */
	public void setEnrichedQuery(String refoQuery) {
		this.enrichedQuery = refoQuery;
	}

	/**
	 * @return Returns the enrichmentType.
	 */
	public EnrichmentType getEnrichmentType() {
		return enrichmentType;
	}

	/**
	 * Changes the value of enrichmentType as the parameter.
	 * 
	 * @param enrichmentType
	 */
	public void setEnrichmentType(EnrichmentType enrichmentType) {
		this.enrichmentType = enrichmentType;
	}

	/**
	 * @return Returns the enrichmentInfo.
	 */
	public List<String> getEnrichmentInfo() {
		return enrichmentInfo;
	}

	/**
	 * Changes the value of enrichmentInfo as the parameter.
	 *
	 * @param enrichmentInfo 
	 */
	public void setEnrichmentInfo(List<String> enrichmentInfo) {
		this.enrichmentInfo = enrichmentInfo;
	}

	@Override
	public String toString() {
		StringBuffer sb = new StringBuffer();
		sb.append("[InstanceResult] = ");
		sb.append("(conceptName=" + conceptName + ");");
		sb.append("(instanceValue=" + instanceValue + ");");
		sb.append("(sourceAddress=" + sourceAddress + ")");
		sb.append("[/InstanceResult]");
		return sb.toString();
	}
}
